import os

from langchain_mcp_adapters.client import MultiServerMCPClient
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
async def getMCPTools():
    connections = {
        "time": {
            "command": "python",
            "args": [os.path.join(BASE_DIR, "time_server.py")],
            "transport": "stdio",
        },
        "db": {
            "url": "http://127.0.0.1:18081/sse",
            "transport": "sse",
        }
    }


    mcp_client = MultiServerMCPClient(connections)
    return  await mcp_client.get_tools()

